import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class HJ22 {//汽水瓶
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int number = 0 ;
        while(in.hasNextInt()){
            number = in.nextInt();
            int count = 0 ;
            while(number-3>=0){
                count++;//记录一瓶
                number-=2;
                if(number >= 0 && number <3){
                    if(number == 2){
                        System.out.println(count + 1);
                    }else{
                        System.out.println(count);
                    }
                }
            }
        }
    }
}